<template>
  <div class="mobile clearfix">
    <MobileHeader />
    <div style="text-align: left;">
      <div v-for="(item, idx) in tuwxq" :key="idx">
        <img v-if="item.zhut != null" :src="item.zhut" />
        <div class="card">
          <div class="card-header">
            <div>
              <h3>{{ item.mingc }}</h3>
            </div>
            <div class="ellipsis">{{ item.jianj }}</div>
          </div>
          <hr />
          <div class="card-content">
            <ul
              v-for="(item2, idx2) in item.wenzList"
              :key="idx2"
              class="card-list"
            >
              <li @click="wenzxq(item2)">{{ item2.wenzbt }}</li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    <MobileFooter />
  </div>
</template>

<script>
import _http from "../httpService";
import MobileHeader from "./MobileHeader.vue";
import MobileFooter from "./MobileFooter.vue";

export default {
  components: {
    MobileHeader,
    MobileFooter,
  },

  data() {
    return {
      tuwxq: [],
      wenzlb: [],
    };
  },

  watch: {
    $route: {
      handler(newRoute) {
        if (newRoute.query.mokid) {
          _http
            .get("/lanm/yixlllmkLanm/getTuwxq?mokId=" + newRoute.query.mokid)
            .then((resp) => {
              if (resp.data.success) {
                this.tuwxq = resp.data.result;
              }
            });
        }
      },
      immediate: true,
    },
  },

  mounted() {},

  methods: {
    wenzxq(wenz) {
      localStorage.setItem("wenzxq", JSON.stringify(wenz));
      this.$router.push("/mobileWenzxq")
      
    },
  },
};
</script>

<style lang="scss" scoped>
@import "../assets/css/public.css";
@import "../assets/css/public.scss";

@import "../assets/css/mobile.css";

.mobile {
  .one-block {
    .list {
      padding: 0.2rem;

      ul {
        height: 100%;
        width: 100%;

        li {
          width: 50%;
          cursor: pointer;
          text-align: center;
          color: #797979;

          .con {
            margin: 0.2rem;
            padding: 0.4rem 0rem;
            box-shadow: 0px 0px 0.2rem rgba(0, 0, 0, 0.1);

            h2 {
              font-size: 0.3rem;
              height: 0.4rem;
              line-height: 0.4rem;
              padding: 0.2rem 0rem 0rem 0rem;
            }

            i {
              font-size: 0.9rem;
              color: #0eb4b6;
            }

            p {
              color: #a0a0a0;
              font-size: 0.25rem;
              line-height: 0.4rem;
              height: 0.4rem;
              font-weight: bold;
            }
          }
        }

        li:last-child {
          border: 0px;
        }

        li.focus {
          position: relative;
          border: 0px;
          color: #fff;

          i,
          p {
            color: #fff;
          }
        }

        li.focus {
          .con {
            background: -webkit-linear-gradient(90deg, #0fb4b6, #8ddadc);
            /* Safari 5.1 - 6.0 */
            background: -o-linear-gradient(90deg, #0fb4b6, #8ddadc);
            /* Opera 11.1 - 12.0 */
            background: -moz-linear-gradient(90deg, #0fb4b6, #8ddadc);
            /* Firefox 3.6 - 15 */
            background: linear-gradient(90deg, #0fb4b6, #8ddadc);
            /* 标准的语法（必须放在最后） */
          }
        }
      }
    }
  }

  .two-block {
    width: 100%;
    margin-bottom: 0.2rem;

    .tit {
      padding: 0.15rem 0rem;
      border-bottom: 1px solid #ddd;
      margin-bottom: 0.2rem;

      h1 {
        font-size: 0.3rem;
        color: #333333;
      }

      .more {
        font-size: 0.25rem;
        cursor: pointer;
        line-height: 0.4rem;
        color: #0eb4b6;
      }
    }

    .img {
      width: 100%;
      height: 200px;
    }

    .li-list {
      font-size: 14px;

      li {
        cursor: pointer;
        text-align: left;
        padding: 8px 50px 4px 0px;
        color: #333;

        span {
          right: 0px;
          color: #444;
        }
      }

      li:hover {
        color: #0eb4b6;
        text-decoration: underline;
      }
    }
  }

  .three-block {
    padding: 0rem 0.2rem;

    .tit-one {
      text-align: left;

      h1 {
        font-size: 18px;
        color: #343434;
      }

      h2 {
        color: #999;
        font-size: 14px;
      }
    }

    .img1 {
      margin: 0.2rem 0rem;
      width: 100%;
      height: 6rem;
      background: url("../assets/images/20200513110635616.jpg") no-repeat center
        center;
    }

    .font {
      left: 0px;
      bottom: 0px;
      right: 0px;
      padding: 10px 10px 20px 20px;
      background: rgba(0, 0, 0, 0.5);
      color: #fff;
      text-align: left;

      h1 {
        font-size: 20px;
        font-weight: normal;
        line-height: 40px;
      }

      h2 {
        font-size: 14px;
        font-weight: normal;
        line-height: 25px;
      }
    }

    .r-list {
      width: 100%;

      .tit {
        border-bottom: 1px solid #dee4ec;
        margin: 0.3rem 0px 0.2rem 0rem;

        h1 {
          font-size: 0.3rem;
          line-height: 0.5rem;
          height: 0.5rem;
          padding-bottom: 0.1rem;
          text-align: left;
          margin-right: 0.4rem;
          color: #7d8794;
        }

        h1.focus {
          color: #222;
        }

        h1.focus:before {
          background: #4cc6c8;
        }

        h1:before {
          content: "";
          position: absolute;
          left: 0px;
          right: 0px;
          bottom: 0px;
          border-radius: 5px 10px 0px 0px;
          height: 4px;
          width: 1.2rem;
          background: transparent;
        }
      }

      .li-block {
        li {
          cursor: pointer;
          float: left;
          width: 50%;
          margin: 0.15rem 0px 0px 0px;

          span {
            display: block;
            margin: 0rem 0.2rem;
            padding: 0.2rem 0rem;
            border: 1px solid #e9ebf0;
            font-size: 0.25rem;
            text-align: center;
            background: #fff;
          }
        }

        li:hover {
          span {
            background: #4fc9ca;
            color: #fff;
            border: 1px solid #4fc9ca;
          }
        }
      }
    }
  }

  .four-block {
    margin: 0.3rem 0rem 0rem 0rem;
    padding: 0.2rem;

    .tit {
      margin: 0rem 0.1rem;

      h1 {
        font-size: 0.3rem;
        line-height: 0.5rem;
        text-align: left;
      }

      h2 {
        font-size: 0.25rem;
        color: #999;
        text-align: left;
      }
    }

    .img-list {
      margin-top: 0.1rem;

      li {
        cursor: pointer;
        float: left;
        width: 50%;

        .con {
          margin: 0.1rem;

          .img {
            width: 100%;
            height: 2.6rem;
          }

          .title {
            display: none;
            left: 0px;
            right: 0px;
            bottom: 2px;
            background: rgba(0, 0, 0, 0.5);
            color: #fff;
            font-size: 14px;
            text-align: center;
            font-weight: bold;
            padding: 10px 0px;
          }
        }

        .con:hover {
          box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);

          .title {
            display: block;
          }
        }
      }
    }

    .img-address {
      img {
        width: 100%;
      }
    }
  }
}
</style>
